package com.sumer.psychology.sharing.application.command;

import com.sumer.psychology.common.domain.model.Author;
import com.sumer.psychology.common.port.adapter.service.AuthorCommand;
import com.sumer.psychology.sharing.domain.model.SharedFile;
import com.sumer.psychology.tag.domain.model.Tag;

import java.util.Set;

/**
 * User: zhenguang.zhu
 * Date: 2014/9/10
 * Time: 10:24
 */
public class CreateSharedResourceCommand implements AuthorCommand {
    private String topic;
    private Author author;
    private Set<SharedFile> sharedFiles;
    private Set<Tag> tags;

    public CreateSharedResourceCommand(String topic, Author author, Set<SharedFile> sharedFiles) {
        this.topic = topic;
        this.author = author;
        this.sharedFiles = sharedFiles;
    }

    public CreateSharedResourceCommand(String topic, Author author, Set<SharedFile> sharedFiles, Set<Tag> tags) {
        this(topic, author, sharedFiles);
        this.tags = tags;
    }

    public String topic() {
        return topic;
    }

    @Override
    public void setAuthor(Author author) {
        this.author = author;
    }

    @Override
    public Author author() {
        return author;
    }

    public Set<SharedFile> sharedFiles() {
        return sharedFiles;
    }

    public Set<Tag> tags() {
        return tags;
    }
}
